from sortedcontainers import SortedList
from typing import *


class Solution:
    def resultsArray(self, queries: List[List[int]], k: int) -> List[int]:

        sl = SortedList()
        ans = []
        for a, b in queries:
            sl.add(abs(a) + abs(b))
            if len(sl) < k:
                ans.append(-1)
            else:
                ans.append(sl[k - 1])
        return ans
